/**
 * Copyright (C) 2018-2020
 * All rights reserved, Designed By www.yixiang.co
 * 注意：
 * 本软件为www.yixiang.co开发研制，未经购买不得使用
 * 购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
 * 一经发现盗用、分享等行为，将追究法律责任，后果自负
 */
package co.yixiang.modules.common.rest;

import co.yixiang.api.ApiResult;
import co.yixiang.modules.commom.domain.YxAppdict;
import co.yixiang.modules.commom.service.YxAppdictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Api(value = "字典", tags = "公共:字典", description = "字典")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class YxAppdictController {

    private final YxAppdictService yxAppdictService;

    /**
     * 根据code查询字典数据
     */
    @GetMapping("/findAppdictByCode/{code}")
    @ApiOperation(value = "根据code查询字典数据",notes = "根据code查询字典数据")
    public ApiResult<YxAppdict> findAppdictByCode(@PathVariable String code){
        return ApiResult.ok(yxAppdictService.findAppdictByCode(code));
    }



}

